package com.warmheart.core.combine.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.warmheart.core.co.model.OrderByModel;
import com.warmheart.core.rs.enums.SmTypeEnum;
import com.warmheart.core.rs.model.DistinctModel;
import com.warmheart.core.rs.model.SelectedModel;

/**
 * 
 * @ClassName: JoinModel
 * @Description: 联合关联模型
 * @author ZhangJianyang
 * @date 2025-06-16 09:37:02
 *
 */
public class JoinModel implements Serializable {

    private static final long serialVersionUID = 1L;

    private List<JoinInfoModel> joinInfoList = new ArrayList<JoinInfoModel>();

    private Map<String, JoinInfoModel> joinMap = new HashMap<String, JoinInfoModel>();
    
    private List<WhereModel> whereList;
    
    private List<OrderByModel> orderList;

    private Boolean mainAllSelectFlag;

    private List<SelectedModel> selectList;
    
    private DistinctModel distinctModel;

    public List<JoinInfoModel> getJoinInfoList() {
        if (this.joinInfoList == null) {
            this.joinInfoList = new ArrayList<JoinInfoModel>();
        }
        return joinInfoList;
    }

    public void setJoinInfoList(List<JoinInfoModel> joinInfoList) {
        this.joinInfoList = joinInfoList;
    }

    public Map<String, JoinInfoModel> getJoinMap() {
        if (this.joinMap == null) {
            this.joinMap = new HashMap<String, JoinInfoModel>();
        }
        return joinMap;
    }

    public void setJoinMap(Map<String, JoinInfoModel> joinMap) {
        this.joinMap = joinMap;
    }
    
    public List<WhereModel> getWhereList() {
        if (this.whereList == null) {
            this.whereList = new ArrayList<WhereModel>();
        }
        return this.whereList;
    }

    public void setWhereList(List<WhereModel> whereList) {
        this.whereList = whereList;
    }
    
    public List<OrderByModel> getOrderList() {
        if (this.orderList == null) {
            this.orderList = new ArrayList<OrderByModel>();
        }
        return this.orderList;
    }

    public void setOrderList(List<OrderByModel> orderList) {
        this.orderList = orderList;
    }
    
    public Boolean getMainAllSelectFlag() {
        if (mainAllSelectFlag == null) {
            mainAllSelectFlag = false;
        }
        return mainAllSelectFlag;
    }

    public void setMainAllSelectFlag(Boolean mainAllSelectFlag) {
        this.mainAllSelectFlag = mainAllSelectFlag;
    }

    public List<SelectedModel> getSelectList() {
        if (this.selectList == null) {
            this.selectList = new ArrayList<SelectedModel>();
        }
        return this.selectList;
    }

    public void setSelectList(List<SelectedModel> selectList) {
        this.selectList = selectList;
    }
    
    public DistinctModel getDistinctModel() {
        if (distinctModel == null) {
            distinctModel = new DistinctModel(true, SmTypeEnum.MULTIPLE);
        }
        return distinctModel;
    }

    public void setDistinctModel(DistinctModel distinctModel) {
        this.distinctModel = distinctModel;
    }
}